import sys
from cx_Freeze import setup, Executable
import os


# Determine the location of the tftpy package

build_exe_options = {
    "packages": ["os", "sys", "serial", "serial.tools.list_ports", 
                 "PyQt6.QtWidgets", "PyQt6.QtGui", "PyQt6.QtCore", 
                 "PyQt6.QtSerialPort", "psutil", "wmi", "socket",
                 "logging","select","threading","time","struct","tftpy",
                 ],
    "includes": [], 
    "include_files": ["ui","assets"],
    "excludes": []
}

base = None
if sys.platform == "win32":
    base = "Win32GUI"

# Define the executable configuration
executables = [
    Executable(
        "main.py", 
        base=base, 
        target_name="Firmware Upgrader.exe", 
        icon="sirket.ico"  # Use your specific icon path
    )
]

# Setup configuration
setup(
    name="Firmware Upgrader - Quark Optical",
    version="0.1",
    description="Firmware Upgrader - Quark Optical",
    options={"build_exe": build_exe_options},
    executables=executables
)
